package edu.cn.nlsde.tmfst.crawler.handler;

import edu.cn.nlsde.Utils.Utils;
import edu.cn.nlsde.tmfst.crawler.processor.crawler_JD;
import edu.cn.nlsde.tmfst.model.Product;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import us.codecraft.webmagic.Spider;

import java.io.FileWriter;
import java.util.Date;
import java.util.regex.Pattern;

/**
 * Created by dell on 2016/5/6.
 */
public class handler_JD {

    private static Logger mylog = LoggerFactory.getLogger(crawler_JD.class.getName());

    public static void crawler_comment(String id) {
        crawler_JD processor = new crawler_JD(id);
        Spider.create(processor)
                .addUrl("https://sclub.jd.com/comment/productPageComments.action?productId=" + id + "&score=0&sortType=3&page=1&pageSize=10&isShadowSku=0")
                .thread(2)
                .run();
    }

    public static void main(String[] args) {
        crawler_comment("3760590");
    }

}
